home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1995…tember: Reference Library / Dev.CD Sep 95 RL / Dev.CD Sep 95 RL.toast / mac / Technical Documentation / develop / develop Issue 15 code / Symmetry & Tiles / Tiler Code / AppInterface.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-05-27  |  1.7 KB  |  73 lines  |  [TEXT/KAHL]

  1. /* Menu IDs and item numbers */
  2. #define kAppleMenuID        128
  3.     #define    iAbout            1
  4.  
  5. #define kFileMenuID            129
  6.     #define    iNew            1
  7.     #define    iOpen            2
  8.     #define    iClose            3
  9.     #define    iSave            4
  10.     #define    iSaveAs            5
  11.     #define    iPageSetup        7
  12.     #define    iPrint            8
  13.     #define    iQuit            10
  14.  
  15. #define kEditMenuID            130
  16.     #define    iUndo            1
  17.     #define    iCut            3
  18.     #define    iCopy            4
  19.     #define    iPaste            5
  20.     #define    iClear            6
  21.  
  22. /* Indexes into global menu array */
  23. #define kAppleMenu            0
  24. #define kFileMenu            1
  25. #define kEditMenu            2
  26.  
  27. /* Protoypes for routines that app must provide */
  28.  
  29. /* The start and the end */
  30. Boolean    AppInit(void);
  31. Boolean    AppQuit(void);
  32. void     AppCleanUp(void);
  33.  
  34. /* Events */
  35. void     AppActivate(WindowPtr wind, Boolean activate);
  36. void     AppUpdate(EventRecord *event);
  37. void     AppIdle(EventRecord *event);
  38. void     AppClick(Point thePt, WindowPtr whichWindptr, Boolean doubleClick, EventRecord *theEvent);
  39. void     AppGrowWindow(WindowPtr wind, Point where, Rect *desk);
  40. void     AppZoomWindow(WindowPtr wind, short zoomDir);
  41.  
  42. /* Menus in general */
  43. void    AppAdjustMenus(void);
  44. void     AppMenu(short id, short item);
  45.  
  46. /* File Menu */
  47. void    AppNew(void);
  48. void    AppOpen(void);
  49. Boolean    AppClose(void);
  50. Boolean    AppSave(void);
  51. Boolean    AppSaveAs(void);
  52. void    AppPageSetup(void);
  53. void    AppPrint(void);
  54.  
  55. /* Edit Menu */
  56. void     AppUndo(void);
  57. void     AppCut(void);
  58. OSErr     AppCopy(void);
  59. void     AppPaste(void);
  60. void     AppClear(void);
  61.  
  62.  
  63. /* utils.c, part of the shell, but we may need 'em */
  64. int            abs(int i);
  65. long        labs(long i);
  66. Boolean     NewPixImage(PixMapHandle ThePix, Rect *TheRect, short dpth);
  67. Boolean     NewBitMap(BitMap *TheMap, Rect *TheRect);
  68. void         CenterRect(Rect *theRect, Point *thePt);
  69. Point         Center(Rect *theRect);
  70. short        NumToolboxTraps(void);
  71. TrapType    GetTrapType(short theTrap);
  72. Boolean        TrapAvailable(short theTrap);
  73.